﻿using System.ComponentModel.DataAnnotations;
using Abp.Application.Services.Dto;

namespace ARchGL.Platform.Dto
{
    public class PagedAndFilteredInputDto : IPagedResultRequest
    {
        [Range(1, AppConsts.MaxPageSize)]
        public int MaxResultCount { get; set; }

        [Range(0, int.MaxValue)]
        public int SkipCount { get; set; }

        private string filter;

        /// <summary>
        /// 关键字搜索
        /// </summary>
        public string Filter
        {
            get => filter;
            set => filter = value?.Trim();
        }

        public PagedAndFilteredInputDto()
        {
            MaxResultCount = AppConsts.DefaultPageSize;
        }
    }
}